package com.example.jpademo.db.entity;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 报价表
 */
@Data
@Entity
@Table(name = "bond_offer")
public class BondOffer implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @Column(name = "id", nullable = false)
    private String id;

    /**
     * 公司ID
     */
    @Column(name = "company_id")
    private String companyId;

    /**
     * 债券ID
     */
    @Column(name = "goods_id")
    private String goodsId;

    /**
     * 债券代码
     */
    @Column(name = "goods_code")
    private String goodsCode;

    /**
     * 类型代码
     */
    @Column(name = "profit_code")
    private String profitCode;

    /**
     * 机构名称
     */
    @Column(name = "bank_name")
    private String bankName;

    /**
     * 机构ID
     */
    @Column(name = "bank_id")
    private String bankId;

    /**
     * 说明
     */
    @Column(name = "description")
    private String description;

    /**
     * 交易方向
     */
    @Column(name = "symbol")
    private Integer symbol;

    /**
     * 价格
     */
    @Column(name = "price")
    private BigDecimal price;

    /**
     * 交易量
     */
    @Column(name = "volume")
    private BigDecimal volume;

    /**
     * 状态
     */
    @Column(name = "deal_status")
    private String dealStatus;

    /**
     * 成交时间
     */
    @Column(name = "deal_time")
    private Date dealTime;

    /**
     * 操作者
     */
    @Column(name = "operator_id")
    private String operatorId;

    /**
     * 审核者
     */
    @Column(name = "review_id")
    private String reviewId;

    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 状态位:1-有效 2-无效
     */
    @Column(name = "status")
    private String status;

    /**
     * 交易员ID
     */
    @Column(name = "bank_agent_id")
    private String bankAgentId;

    /**
     * 交易员代码
     */
    @Column(name = "agent_code")
    private String agentCode;

    /**
     * VIP
     */
    @Column(name = "flag_vip")
    private Boolean flagVip;

    /**
     * 危险
     */
    @Column(name = "flag_bad")
    private Boolean flagBad;

    /**
     * 可议价
     */
    @Column(name = "flag_bargain")
    private String flagBargain;

    /**
     * 是否紧急报价
     */
    @Column(name = "flag_urgent")
    private Boolean flagUrgent;

    /**
     * 是否换券报价
     */
    @Column(name = "flag_exchange")
    private Boolean flagExchange;

    /**
     * 价格说明
     */
    @Column(name = "price_description")
    private String priceDescription;

    /**
     * 债券类型
     */
    @Column(name = "goods_type")
    private String goodsType;

    /**
     * 债券简称
     */
    @Column(name = "goods_short_name")
    private String goodsShortName;

    /**
     * 债券评级
     */
    @Column(name = "goods_level")
    private String goodsLevel;

    /**
     * 剩余期限
     */
    @Column(name = "goods_term")
    private String goodsTerm;

    /**
     * 债券名称
     */
    @Column(name = "goods_name")
    private String goodsName;

    /**
     * 期权方式
     */
    @Column(name = "option_type")
    private String optionType;

    /**
     * 利率类型
     */
    @Column(name = "rate_type")
    private String rateType;

    /**
     * 内部报价
     */
    @Column(name = "internally")
    private String internally;

    /**
     * 是否关联
     */
    @Column(name = "flag_relation")
    private String flagRelation;

    /**
     * 交易员ID
     */
    @Column(name = "trader_id")
    private String traderId;

    /**
     * 报价类型
     */
    @Column(name = "quote_type")
    private String quoteType;

    /**
     * 返点值
     */
    @Column(name = "return_point")
    private BigDecimal returnPoint;

    /**
     * 净价
     */
    @Column(name = "net_price")
    private BigDecimal netPrice;

    /**
     * 全价
     */
    @Column(name = "full_price")
    private BigDecimal fullPrice;

    /**
     * 收益率
     */
    @Column(name = "yield")
    private BigDecimal yield;

    /**
     * 利差
     */
    @Column(name = "spread")
    private BigDecimal spread;

    /**
     * 清算速度
     */
    @Column(name = "clear_speed")
    private String clearSpeed;

    /**
     * 交割日
     */
    @Column(name = "delivery_date")
    private Date deliveryDate;

    /**
     * 行权
     */
    @Column(name = "exercise")
    private String exercise;

    /**
     * 返点
     */
    @Column(name = "rebate")
    private String rebate;

    /**
     * 发送状态
     */
    @Column(name = "send_status")
    private String sendStatus;

    /**
     * 是否计算
     */
    @Column(name = "calculate_status")
    private Integer calculateStatus;

    /**
     * 债券key
     */
    @Column(name = "bond_key")
    private String bondKey;

    /**
     * 流通市场
     */
    @Column(name = "listed_market")
    private String listedMarket;

    /**
     * 债券流通市场代码
     */
    @Column(name = "bond_key_listed_market")
    private String bondKeyListedMarket;

    /**
     * 债券类型,BCO/BNC/ABS/NCD/BBE
     */
    @Column(name = "bond_category")
    private String bondCategory;

    @Column(name = "location")
    private String location;

    /**
     * 最近操作人id
     */
    @Column(name = "oper_id")
    private String operId;

    /**
     * 最近操作人名称
     */
    @Column(name = "oper_name")
    private String operName;

    /**
     * 交易日
     */
    @Column(name = "traded_date")
    private Date tradedDate;

    /**
     * 结算日
     */
    @Column(name = "settlement_date")
    private Date settlementDate;

    /**
     * 创建时间(精确到毫秒)
     */
    @Column(name = "createtime")
    private Date createtime;

    /**
     * 修改时间(精确到毫秒)
     */
    @Column(name = "modifytime")
    private Date modifytime;

    /**
     * 成交时间(精确到毫秒)
     */
    @Column(name = "dealtime")
    private Date dealtime;

    /**
     * 来源 1-idb,2-idc
     */
    @Column(name = "source")
    private String source;

    /**
     * 创建源 1-idb,2-idc
     */
    @Column(name = "create_source")
    private String createSource;

}
